import { createRouter, createWebHistory } from "vue-router"

const routes = [
  {
    path: '/helloworld',
    name: 'helloWorld',
    component: () => import('@/components/HelloWorld.vue'),
    
  },
  
  {
    path: '/',
    name: 'home',
    component: () => import('@/components/Home.vue'),
    children:[
      {path: 'user', name: 'user', component: () => import('@/components/User/user.vue')},
      {path: 'stu', name: 'stu', component: () => import('@/components/User/student.vue')},
      {path: 'dor', name: 'dor', component: () => import('@/components/User/dormitory.vue')},
    ],
    redirect: '/user'
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
